{% extends '__base.tpl' %}

{% block head %}
{{super()}}
<!-- build:css -->
<link rel="stylesheet" type="text/css" href="../../../public/css/page/popup.css" />
<link rel="stylesheet" type="text/css" href="../../../public/css/page/user_Withdraw.css" />
<!-- endbuild -->
{% endblock %}

{% block body %}
<div class="user-bg withdraw-box">
    <div id="box">
        <div class="section-box">
            <div class="section-title">
                <span class="font24">余额提现</span>
                <span class="ml20 clo6">
                    账户余额：<span class="red" id="money"></span>元
                </span>
            </div>
            <div class="withdraw-content">
                <dl>
                    <dd class="clo6">选择银行卡：</dd>
                    <dt>
                        <div class="select relative">
                            <div class="checked-account" data-type="1" onclick="BASE.USERWITHDRAW.getData(this)">
                              请选择银行卡
                            </div>
                            <ul class="withdraw-lists hide"></ul>
                            <script id="list_tpl1" type="text/html">
                                <%if list.length>0%>
                                    <%each list as arr i%>
                                        <li class="withdraw-lists-item" data-id="<%arr.id%>">
                                            <span class="radio"></span>
                                            <img class="vsub" src="../../../public/images/withdraw_card.png" alt="card">
                                            <span><%arr.bank%> <%arr.idNo%></span>
                                            <i class="card-icon">快捷</i>
                                            <span class="clo9 fright font12" data-id="<%arr.id%>"
                                                  onclick="BASE.USERWITHDRAW.deleteWithAccout(this);event.stopPropagation();">移除</span>
                                        </li>
                                    <%/each%>
                                <%else%>
                                    <li class="center">
                                        暂无绑定账户
                                    </li>
                                <%/if%>
                            </script>
                            <span class="add-account" data-type="1"
                                  onclick="BASE.USERWITHDRAW.addPrev(this)">+添加新卡</span>
                       </div>

                    </dt>
                </dl>
                <dl>
                    <dd class="clo6">选择微信：</dd>
                    <dt>
                        <div class="select relative">
                            <div class="checked-account"  data-type="3" onclick="BASE.USERWITHDRAW.getData(this)">
                                请选择账户
                            </div>
                            <ul class="withdraw-lists hide"></ul>
                            <script id="list_tpl3" type="text/html">
                                <%if list.length>0%>
                                    <%each list as arr i%>
                                    <li class="withdraw-lists-item"  data-id="<%arr.id%>">
                                        <span class="radio"></span>
                                        <img class="vmiddle" src="../../../public/images/withdraw_weixin.png" alt="weixin">
                                        <span>账号： <%arr.idNo%></span>
                                        <span class="clo9 fright font12" data-id="<%arr.id%>"
                                              onclick="BASE.USERWITHDRAW.deleteWithAccout(this);event.stopPropagation();">移除</span>
                                    </li>
                                    <%/each%>
                                <%else%>
                                    <li class="center">
                                        暂无绑定账户
                                    </li>
                                <%/if%>
                            </script>
                            <span class="add-account" data-type="3"
                                  onclick="BASE.USERWITHDRAW.addPrev(this)">+添加新账号</span>
                        </div>
                    </dt>
                </dl>
                <dl>
                    <dd class="clo6">选择支付宝：</dd>
                    <dt>
                        <div class="select relative">
                            <div class="checked-account" data-type="2" onclick="BASE.USERWITHDRAW.getData(this)">
                                请选择账户
                            </div>
                            <ul class="withdraw-lists hide"></ul>
                            <script id="list_tpl2" type="text/html">
                                <%if list.length>0%>
                                    <%each list as arr i%>
                                    <li class="withdraw-lists-item"  data-id="<%arr.id%>">
                                        <span class="radio"></span>
                                        <img class="vmiddle" src="../../../public/images/withdraw_alipay.png" alt="alipay">
                                        <span>账号： <%arr.idNo%></span>
                                        <span class="clo9 fright font12" data-id="<%arr.id%>"
                                              onclick="BASE.USERWITHDRAW.deleteWithAccout(this);event.stopPropagation();">移除</span>
                                    </li>
                                    <%/each%>
                                <%else%>
                                    <li class="center">
                                        暂无绑定账户
                                    </li>
                                <%/if%>
                            </script>
                            <span class="add-account" data-type="2"
                                  onclick="BASE.USERWITHDRAW.addPrev(this)">+添加新账号</span>
                        </div>
                    </dt>
                </dl>
                <dl>
                    <dd class="clo6">提现金额：</dd>
                    <dt>
                        <input type="number" id="withdraw_money" class="input" placeholder="输入金额（最低10元）" style="width: 200px">
                        元<span class="font12 clo6">（收取 <span id="withdrawCharge">1</span>%的服务费）</span>
                        <a href="javascript:;" class="blue font12 mr10 ml5"
                           onclick="BASE.USERWITHDRAW.withdrawTotal()">全部提现</a>
                    </dt>
                </dl>
                <div class="center" style="padding-top: 60px;">
                    <button class="common-btn" id="submit" onclick="BASE.USERWITHDRAW.withdrawPrev(this)">确认</button>
                </div>
            </div>
        </div>
    </div>
</div>


<div id="bindAccout" style="display: none" class="popup">
    <div class="popupBody">
        <div class="popupDiv1">
            <b>绑定<span class="title"></span></b>
            <i class="pointer" onclick="$('#bindAccout').hide()">
                <img src="../../../public/images/close.jpg">
            </i>
        </div>
        <ul class="center pd20">
            <li>
                <span class="clo6 require">真实姓名：</span>
                <input id="name" type="text" class="input ml20">
                <div class="mt5 font13 clo9">为了保护账户资金安全，只能绑定认证用户为本人的账号。</div>
            </li>
            <li class="mt20 hide card-bank">
                <span class="clo6 require">开户银行：</span>
                <input id="bank" type="text" class="input ml20" placeholder="请输入开户行">
            </li>
            <li class="mt20">
                <span class="clo6 require">绑定账号：</span>
                <input id="idNo" type="text" class="input ml20" placeholder="请输入账号">
            </li>
            <li class="cneter" style="padding-top: 80px">
                <button class="common-btn" onclick="BASE.USERWITHDRAW.sureBind(this)">确认</button>
            </li>
        </ul>
    </div>
</div>

<div class="popCenter hide" id="getCode">
    <a href="javascript:;" class="close" onclick="$(this).parent().hide()">
        <img src="../../../public/images/close.jpg">
    </a>
    <h5 class="text-align-center font24">填写手机验证码</h5>
    <input class="input mt30" type="text" id="vcode" placeholder="请输入绑定手机的验证码">
    <div class="text-align-center relative" style="padding-top: 60px">
        <button class="common-btn blue-change-btn" onclick="BASE.USERWITHDRAW.withdraw(this)">确认</button>
    </div>
</div>
{% endblock %}

{% block script %}
{{ super() }}
<!-- build:js -->
<script src="../../../public/js/page/user/userWithdraw.js"></script>
<!-- endbuild -->
{% endblock %}